Clock synchronization method and apparatus

ABSTRACT

A clock synchronization apparatus and method, which perform clock synchronization by determining a clock offset and a network delay between a master and a slave in an IEEE 1588 system. The clock synchronization method and apparatus include observing a clock offset and a packet delay using a timing packet received from a master node; estimating a clock offset and a packet delay from the observed clock offset and the observed packet delay; and performing synchronization with the master node based on the clock offset and the packet delay.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority to Korean patent application number 10-2015-0162035, filed on Nov. 18, 2015, the entire disclosure of which is incorporated herein in its entirety by reference.

BACKGROUND

1. Field of Invention

Various embodiments of the present disclosure relate to a clock synchronization method and apparatus and, more particularly, to a method and apparatus for performing clock synchronization by determining a clock offset and a network delay between a master and a slave in an IEEE 1588 system. 2. Description of Related Art

In IEEE 1588 systems, as technology for synchronizing the clocks of nodes, an IEEE 1588 Precision Time Protocol (PTP) is used. The IEEE 1588 PTP estimates clock offset between nodes based on the packet delay estimation to synchronize clocks between nodes. For example, in a network with the IEEE 1588 PTP, all slave nodes synchronize their clocks with that of a master node by estimating clock offset between the slave node and the master node based on the packet delay estimation.

The clock offset estimation based on the packet delay estimation of the IEEE 1588 PTP is frequently used in various network systems owing to the simple structure and high performance thereof. However, in actual network systems, the IEEE 1588 PTP has a tendency to deteriorate the performance thereof due to various factors. As the factors deteriorating the performance of the IEEE 1588 PTP, there are various factors, such as an asymmetry of the packet delay, a clock skew, an algorithm for selecting the master node and a failure in synchronization with the master.

However, the most significant factor that deteriorates performance in the IEEE 1588 PTP is the inaccuracy of estimation of the packet delay due to the asymmetry of the packet delay. More specifically, in the IEEE 1588 PTP, the packet delay from the master to the slave and the packet delay from the slave to the master are assumed to be identical to each other. However, in an actual network environment, the two packet delays are not identical to each other due to various environmental variables, such as jitter. Therefore, such inaccurate estimation causes errors in estimating the clock offset between the master and the slave, and makes it impossible to completely synchronize the clocks of the master and the slave with each other.

SUMMARY

Various embodiments of the present disclosure are directed to a method and apparatus for accurately performing clock synchronization by determining both a clock offset and a network delay between nodes in real time using an Unscented Kalman Filter (UKF) and Integrated Nested Laplace Approximation (INLA) in a distributed system.

Various embodiments of the present disclosure are directed to provide a Dynamic Linear Model (DLM) for the clock offset estimation based on the packet delay estimation.

Further, various embodiments of the present disclosure are directed to a method and apparatus for accurately performing clock synchronization by using the provided DLM.

One embodiment of the present disclosure provides a clock synchronization method, including observing a clock offset and a packet delay using a timing packet received from a master node; estimating a clock offset and a packet delay from the observed clock offset and the observed packet delay; and performing synchronization with the master node based on the clock offset and the packet delay.

Another embodiment of the present disclosure provides a clock synchronization apparatus, including an input unit configured to receive a timing packet from a master node; and a controller configured to estimate a clock offset and a packet delay using the timing packet, and perform synchronization with the master node based on the clock offset and the packet delay, wherein the controller comprises a filter configured to estimate the clock offset and the packet delay from a clock offset and a packet delay that are observed using the timing packet.

Another embodiment of the present disclosure provides a clock synchronization method of a clock synchronization apparatus, comprising obtaining time information including packet transmission and packet receiving time of master node and slave node through packet exchange between the master node and the slave node; estimating a clock offset and a packet delay between the master node and the slave node; and performing clock synchronization between the master node and the slave node based on the estimated clock offset and the packet delay.

Another embodiment of the present disclosure provides a clock synchronization apparatus, comprising an input unit configured to perform packet exchange between a master node and a slave node; a controller configured to obtain time information including packet transmission and packet receiving time of the master node and the slave node through the packet exchange, estimate a clock offset and a packet delay between the master node and the slave node, and perform clock synchronization between the master node and the slave node based on the estimated clock offset and the packet delay.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the configuration of a distributed system to which the present disclosure is applicable;

FIG. 2 is a flowchart showing a method for clock synchronization between nodes according to the present disclosure;

FIG. 3 is a block diagram showing the structure of a clock synchronization apparatus according to the present disclosure; and

FIG. 4 is a flowchart showing in detail the operation of a filter according to the present disclosure.

FIG. 5 is a flowchart showing in detail the operation of controller according to the present disclosure.

DETAILED DESCRIPTION

Repeated descriptions and descriptions of known functions and configurations which have been deemed to make the gist of the present disclosure unnecessarily obscure will be omitted below.

It is also noted that in this specification, “connected/coupled” refers to one component not only directly coupling another component but also indirectly coupling another component through an intermediate component. On the other hand, “directly connected/directly coupled” refers to one component directly coupling another component without an intermediate component.

In the present specification, it should be understood that the terms such as “include” or “have” are merely intended to indicate that features, numbers, steps, operations, components, parts, or combinations thereof are present, and are not intended to exclude a possibility that one or more other features, numbers, steps, operations, components, parts, or combinations thereof will be present or added.

A singular expression includes a plural expression unless a description to the contrary is specifically pointed out in context.

Hereinafter, the present disclosure will be described in detail with reference to the attached drawings.

FIG. 1 is a diagram showing the configuration of a distributed system to which the present disclosure is applicable.

A distributed system 100 according to the present disclosure is an IEEE 1588 PTP based system, and multiple nodes 110-1, 110-2, 110-3, and 110-4 constituting the distributed system 100 synchronize their times with each other using a time (clock) synchronization apparatus according to the present disclosure.

Some node of the multiple nodes 110-1, 110-2, 110-3, and 110-4 constituting the distributed system 100 functions as a master node 110-1 capable of transmitting information for clock synchronization to all nodes of the distributed system 100.

Further, some other node of the multiple nodes 110-1, 110-2, 110-3, and 110-4 constituting the distributed system 100 functions as a slave node 110-2 for synchronizing its time with the time of the master node 110-1 using clock synchronization information transmitted from the master node 110-1.

The master node 110-1 uses time information received from a Global Positioning System (GPS) or an exact clock source as basic time (clock) for IEEE 1588 PTP.

The slave node 110-2 synchronizes its internal time (local clock) with the time of the master node 110-1 using the time information received from the master node 110-1.

In the distributed system 100 according to the present disclosure, the master node 110-1 and the slave node 110-2 perform the clock synchronization according to the present disclosure.

The master node 110-1 and the slave node 110-2 according to the present disclosure may estimate, from an observed clock offset, both a clock offset and a packet delay in which an actual network environment is reflected, by using a Dynamic Linear Model (DLM), an Unscented Kalman Filter (UKF) and an Integrated Nested Laplace Approximation (INLA).

Below, a clock synchronization apparatus provided in each of multiple nodes 110-1, 110-2, 110-3, and 110-4 to perform the clock synchronization is described in detail.

Hereinafter, a time of the master node 110-1 is denoted by T, and a time of the slave node 110-2 is denoted by C[T]. The clock offset δ is the difference between T and C[T]. An initial clock offset is denoted by δ₀ where the lower index is used to express the number of clock synchronization recursion.

In the clock synchronization, the packet exchange in FIG. 2 is used for the estimation.

Referring to FIG. 2, in the k-th clock synchronization recursion, the master node 110-1 transmits a packet (sync packet) P1 to the slave node 110-2 at T_(1,k). The δ_(k) is defined by C[T_(1,k) ^(κ−1)]−T_(1,k), where the upper index is used to express applications of previous clock synchronizations to the slave node 110-2; C[T_(i,k) ^(κ)]=C[T_(i,k) ⁰]−Σ_(j=1) ^(κ){circumflex over (δ)}_(j), i∈{1, 2, 3, 4},κ∈N, where N is a set of natural numbers, and {circumflex over (δ)}_(j) is estimated clock offset by j-th clock synchronization.

Further, the master node 110-1 measures T_(1,k) at which packet P1 is transmitted, and transmits the measured T_(1,k) information to the slave node 110-2.

The slave node 110-2 measures C[T_(2,k) ^(κ−1)] at which packet P1 is received.

The slave node 110-2 transmits packet (delay-request packet) P2 to the master node 110-1. Further, the slave node 110-2 measures C[T_(3,k) ^(κ−1)] at which packet P2 is transmitted, and transmits the measured time C[T_(3,k) ^(κ−1)] to the master node 110-1.

The master node 110-1 measures T_(4,k) at which packet P2 is received.

The master node 110-1 and the slave node 110-2 share the measured information and calculate the estimated clock offset {circumflex over (δ)}_(k) accroding to the present disclosure.

The slave node 110-2 updates the clock of the slave node 110-2 by {circumflex over (δ)}_(k).

The estimated clock offset {circumflex over (δ)}_(k) is calculated by a clock synchronization apparatus according to the present disclosure.

FIG. 3 is a block diagram showing the structure of a clock synchronization apparatus according to the present disclosure. A clock synchronization apparatus 300 shown in FIG. 3 is a device included in the master node 110-1 or the slave node 110-2 and may be a device for performing operation required for clock synchronization.

Referring to FIG. 3, the clock synchronization apparatus 300 according to the present disclosure may include an input unit 310, a controller 320, and an output unit 330.

The input unit 310 collects pieces of information about time T₁ at which the master node 110-1 transmits packet P1, time T₂ at which the slave node 110-2 receives packet P1, time T₃ at which the slave node 110-2 transmits packet P2 to the master node 110-1, and time T₄ at which the master node 110-1 receives packet P2.

The controller 320 estimates a clock offset and a packet delay (δ_(i) and φ_(j) where i,j is non-negative integer) between the master node 110-1 and the slave node 110-2 using the system information collected through the input unit 310. Further, the controller 320 performs clock synchronization between the master node 110-1 and the slave node 110-2 by estimating the clock offset of the slave node 110-2 based on the estimated clock offset and packet delay. The controller 320 may output the estimated clock offset and the packet delay for the clock synchronization.

In various embodiments of the present disclosure, the controller 320 observes the clock offset using the collected time information, and estimates a clock offset and a packet delay in which an actual system environment is reflected, using a Dynamic Linear Model (DLM), and an Unscented Kalman Filter (UKF) based on the DLM and Integrated Nested Laplace Approximation (INLA) from the observed clock offset. For this operation, the controller 320 may include a filter 321 for performing a UKF operation and a Laplace operator 322 for performing INLA.

The detailed structure of the DLM, operations of the filter 321 and the Laplace operator 322 will be described later.

The controller 320 may directly perform clock synchronization with the master node 110-1 by estimating the clock offset of the slave node 110-2 based on the estimated clock offset and packet delay, or may perform clock synchronization using other components constituting the slave node 110-2 by outputting the estimated clock offset and packet delay through the output unit 330.

The output unit 330 may output the clock offset and the packet delay estimated by the controller 320 to the outside of the clock synchronization apparatus.

Below, the detailed operations of the filter 321 and the Laplace operator 322 will be described.

FIG. 4 is a flowchart showing in detail the operation of the filter according to the present disclosure.

The filter 321 estimates a packet delay and a clock offset using a UKF. The UKF is a filter that enables accurate estimation even if a target to be estimated exhibits strong nonlinearity. For nonlinear filtering, the UKF uses symmetric sampling, Gaussian Markov chain approximation, and a Kalman filter framework.

All procedures in the UKF according to the present disclosure are performed, with a fixed number of parameters being intuited. The filter 321 is designed in consideration of parameters that may influence the estimation of a packet delay and a clock offset. That is, the filter outputs an estimated clock offset which is estimated to be a clock offset in an actual environment, based on the observed clock offset and parameters that are input, and a DLM over time.

For a certain input vector u, when a clock offset z_(k+1) and a packet delay x_(k+1) observed at (k+1)-th time (current) synchronization are represented by the following Equation (1), the filter 321 estimates {{circumflex over (z)}_(k+1), {circumflex over (x)}_(k+1)} using a UKF.

z _(k+1) =h[x _(k+1) ]+w _(k+1) , w _(k+1) ˜N(0, Q_(k+1))   (1-1)

x_(k+1) =g[x _(k) ,u _(k+1) ,v _(k+1) ], v _(k+1) ˜N(0, R _(k+1))   (1-2)

Here, x_(k) denotes a previously estimated packet delay, that is, a packet delay estimated in k-th synchronization. The filter 321 estimates a current clock offset and a current packet delay using both the previously estimated packet delay and the currently observed clock offset.

In the distributed system 100 according to the present disclosure, functions h and g may be linear functions or may also be nonlinear functions due to jitter resulting from synchronization or communication distribution scheduling, frequency distortion, processing speed, interrupt/system call processing, and etc.

Referring to FIG. 4, the filter 321 defines an n-dimensional state random vector x_(k) ^(α) and a covariance P_(k) ^(α) from the packet delay x_(k) (401). Here, the state random vector x_(k) ^(α) may be defined by the following Equation (2), and the covariance P_(k) ^(α) may be represented by the following Equation (3):

$\begin{matrix} {x_{k}^{a} = \left\lbrack {x_{k}^{T}v_{k}^{T}} \right\rbrack^{T}} & (2) \\ {P_{k}^{a} = \begin{bmatrix} P_{k}^{xx} & P_{k}^{xy} \\ P_{k}^{yx} & P_{k}^{yy} \end{bmatrix}} & (3) \end{matrix}$

Next, the filter 321 generates a sigma point set using the covariance P_(k) ^(α) (402). In this regard, the filter 321 may generate (2N+1) symmetric points X_(j) using an N×N matrix, as given by the following Equation (4), where N denotes the number of state random vectors x_(k) ^(α).

[X _(k) ^(α)]₀ ^(x) ={circumflex over (x)} _(k) ^(α), [X_(k) ^(α)]_(j) ^(x) ={circumflex over (x)} _(k) ^(α)+σ_(j) , [X _(k) ^(α)]_(j+N) ^(x) ={circumflex over (x)} _(k) ^(α)−σ_(j)   (4)

where σ_(j)=γ└√{square root over (P_(k) ^(α))}┘, γ=√{square root over (λ+N)}, λ=α²(κ+N)−N, └√{square root over (P_(k) ^(α))}┘_(j) is the j-th column (j={1, 2, . . . , N}) of the matrix √{square root over (P_(k) ^(α))}.

Then, the filter 321 calculates a weight W (403). The weight W may be calculated using the following Equation (5):

W ₀ ^(x)=λ/(λ+N)   (5-1)

W ₀ ^(P)=λ/(λ+N)+(1−α²+β)   (5-2)

W _(l) ^(x) =W _(l) ^(P)=1/2(λ+N)   (5-3)

where l={1, 2, . . . , 2N}, λ=α²(κ+N−N, and {α,β,κ} are scale variables.

Thereafter, the filter 321 predicts {circumflex over (z)}_(k+1) and {circumflex over (x)}_(k+1) using the generated sigma point set and the calculated weight W (404). The filter 321 predicts {circumflex over (z)}_(k+1) and {circumflex over (x)}_(k+1) using the sigma point set and the weighted sigma point set to which the weight W is added, as given by the following Equation (6):

{circumflex over (z)} _(k+1|k)=Σ_(i=0) ^(2N) W _(i) ^(x) [Z _(k+1|k)]_(i)   (6-1)

{circumflex over (x)} _(k+1|k)=Σ_(i=0) ^(2N) W _(i) ^(x) [X _(k+1|k)]_(i)   (6-2)

P _(k+1|k) ^({circumflex over (z)}{circumflex over (z)})=Σ_(i−0) ^(2N) W _(i) ^(P) [[Z _(k+1|k)]_(i) −{circumflex over (z)} _(k+1|k) ][[Z _(k+1|k)]_(i)−{circumflex over (z)}_(k+1|k)]^(T) +Q _(k+1)   (6-3)

P _(k+1|k) ^(xx)=Σ_(i−0) ^(2N) W _(i) ^(P) [[X _(k+1|k)]_(i) −{circumflex over (x)} _(k+1|k) ][[X _(k+1|k)]_(i) −{circumflex over (x)} _(k+1|k)]^(T)   (6-4)

where Z_(k+1|k)=H[{[X_(k) ^(α)]_(j) ^(z)}], X_(k+1|k)=G[{[X_(k) ^(α)]_(j) ^(z)}, u(k+1)], and {[X_(k) ^(α)]^(z)} denotes 2N+1 symmetric points based on {circumflex over (x)}_(k+1|k) and P_(k+1|k) ^(xx).

Next, the filter 321 updates the predicted {circumflex over (x)}_(k+1) using a prediction error (405). The filter 321 determines a prediction error ε_(k+1)=(z_(k+1)−{circumflex over (z)}_(k+1)) from the difference between the predicted {circumflex over (z)}_(k+1) and the observed clock offset z_(k+1), and calculates a cross correlation matrix {circumflex over (P)}_(k+1|k) ^(xz) using the following Equation (7):

P _(k+1|k+1) ^(x{circumflex over (z)})=Σ_(i=0) ^(2N) W _(i) ^(P) [[X _(k+1|k)]_(i) −{circumflex over (x)} _(k+1|k) ][[Z _(k+1|k)]_(i) −{circumflex over (z)} _(k+1|k)]^(T)   (7)

The filter 321 updates the predicted {circumflex over (x)}_(k+1) using the calculated cross correlation matrix, as given by the following Equations (8) and (9):

{circumflex over (x)}_(k+1|k+1) ={circumflex over (x)} _(k+1|k) +K _(k+1)ε_(k+1)   (8)

P _(k+1|k+1) ^(xx) =P _(k+1|k) ^(xx) −K _(k+1) P _(k+1|) ^({circumflex over (z)}{circumflex over (z)}) K _(k+1) ^(T)   (9)

where K_(k+1)=P_(k+1|k) ^(xx)−(P_(k+1|k) ^({circumflex over (z)}{circumflex over (z)}))⁻¹.

The Laplace operator 322 regards the clock offset estimated by the filter 321 as a latent Gaussian model, and derives a hyperparameter θ_(k+1)={Q_(k+1), R_(k+i)} for the estimated clock offset z_(k+1). For this operation, the Laplace operator 322 uses Integrated Nested Laplace Approximation (INLA), as in the following Equation (10):

$\begin{matrix} {{\overset{\sim}{\pi}\left( {xz} \right)} = {\int{{\overset{\sim}{\pi}\left( {{x\theta},z} \right)}{\overset{\sim}{\pi}\left( {\theta z} \right)}{\theta}}}} & \left( {10\text{-}1} \right) \\ {{{\overset{\sim}{\pi}\left( {\theta z} \right)} \propto \frac{\pi \left( {x,\theta,z} \right)}{\overset{\sim}{\pi}\left( {{x\theta},z} \right)}}}_{x = {F^{*}{(\theta)}}} & \left( {10\text{-}2} \right) \end{matrix}$

where {tilde over (π)}(θ|z) denotes an approximate expression of π(θ|z), F denotes functional approximation, and F* denotes the value of mode.

Considering that Equation (1) represents a first order Markov chain, the posterior marginal distribution π(θ_(k+1)|z_(1:k+1)) of the hyperparameter θ_(k+1) is approximated, as representd by the following Equation (11):

$\begin{matrix} \left. {{\pi \left( \theta_{k + 1} \middle| Z_{{1\text{:}k} + 1} \right)} \approx {\overset{\sim}{\pi}\left( \theta_{k + 1} \middle| z_{{1\text{:}k} + 1} \right)} \propto \frac{\pi \left( {x_{k + 1},\theta_{k + 1},z_{k + 1}} \right)}{{\overset{\sim}{\pi}}_{F}\left( {\left. x_{k + 1} \middle| \theta_{k + 1} \right.,z_{k + 1}} \right)}} \right|_{x_{k + 1} = {F^{*}{(\theta)}}} & (11) \end{matrix}$

Equation (11) may be sequentially approximated, as given in the following Equation (12):

$\begin{matrix} {\left. {{\pi \left( \theta_{k + 1} \middle| z_{{1\text{:}k} + 1} \right)} \approx {\overset{\sim}{\pi}\left( \theta \middle| z_{{1\text{:}k} + 1} \right)} \propto \frac{\overset{\sim}{\pi}\left( {x_{k + 1},\theta,z_{k + 1}} \right)}{{\overset{\sim}{\pi}}_{F}\left( {\left. x_{k + 1} \middle| \theta \right.,z_{k + 1}} \right)}} \right|_{x_{k + 1}} = {\left. {{F^{*}(\theta)} \propto \frac{{\overset{\sim}{\pi}\left( {\left. z_{k + 1} \middle| x_{k + 1} \right.,\theta,z_{k + 1}} \right)}{\overset{\sim}{\pi}\left( {\left. x_{k + 1} \middle| \theta \right.,z_{k + 1}} \right)}}{{\overset{\sim}{\pi}}_{F}\left( {\left. x_{k + 1} \middle| \theta \right.,z_{k + 1}} \right)}} \middle| x_{k + 1} \right. = {F^{*}(\theta)}}} & (12) \end{matrix}$

In order to perform calculation, {tilde over (π)}_(G)(x_(k+1)|θ,z_(1:k+1)) in Equation (12) may be replaced with the following Equation (13):

{tilde over (π)}_(F)(x _(k+1) |θ,z _(k+1))={tilde over (π)}_(G)(x _(k+1) |θ,z _(k+1))∝exp(−1/2(x _(k+1)−{circumflex over (μ)})^(T){circumflex over (Σ)}⁻¹(x _(k+1)−{circumflex over (μ)}))   (13)

When {circumflex over (Σ)}⁻¹ and {circumflex over (μ)} are calculated using a Newton-Raphson method, Equation (13) may be represented by the following Equation (14):

π(x_(k+1),|θ,z_(1:k+1))∝exp(−1/2x_(k+1) ^(T)Σ⁻¹x_(k+1)+Σ_(i) ^(k+1) log π(z_(i)|x₊₁))   (14)

In Equation (14), for computational efficiency, the initial condition is set to μ₍₀₎=argmax_(x) _(k+1) {tilde over (π)}_(UKF)(x_(k+1)|θ,z_(1:k+1)).

In various embodiments, the operation of the Laplace operator 322 may be performed to derive the hyperparameter while the filter 321 estimates the clock offset and the packet delay using the UKF. Accordingly, the Laplace operator 322 may be provided in the filter 321 or may constitute the filter 321 itself.

In other embodiments, the derivation of the hyperparameter using INLA may be performed in advance before the clock offset and the packet delay are estimated using a UKF. Alternatively, the derivation of the hyperparameter using INLA may also be performed after the clock offset and the packet delay are estimated using a UKF, in order to estimate the clock offset in a subsequent period. In relation to this operation, the present disclosure is not limited to specific cases.

Hereinafter, in accordance with another embodiment of the invention, a method for the clock synchronization, DLM is described.

FIG. 5 is a flowchart showing in detail the operation of controller according to the present disclosure.

According to the FIG. 5, the controller 320 performs the packet exchange with other clock synchronization apparatus (501). In detail, when the clock synchronization apparatus 300 of the controller 320 operates as the master node 110-1, the controller 320 transmits P1 and receives P2 as described in FIG. 2. When the clock synchronization apparatus 300 of the controller 320 operates as the slave node 110-2, the controller 320 receives P1 and transmits P2.

The controller 320 obtains time information including T_(1,k), C[T_(2,k) ^(κ−1)], C[T_(3,k) ^(κ−1)] and T_(4,k) (502).

After that, the controller 320 estimates the clock offset and the packet delay (503).

In detail, the controller 320 defines a relation between the packet delays, φ_(s,k) and φ_(d,k) where φ_(s,k) and φ_(d,k) are packet delays of the k-th P1 and P2, respectively. After, the controller 320 derives a DLM for the PDV so the estimated clock offset and the packet delay reflects the actual system environment. And the controller 320 estimates the clock offset and the packet delay using the derived DLM.

In detail, the controller 320 defines the relation between the packet delays φ_(s,k) and φ_(d,k) by the following Equation (15):

φ_(d,k)=φ_(s,k)+ψ_(k)   (15)

From Equation (16), ψ_(k) represents a packet delay variation (PDV) between the P1 and the P2 in FIG. 2.

An error in the estimation of the packet delay may be represented as ε_(φ,k). Also, an error in the estimation of the clock offset may be represented as ε_(δ,k) .

After, the controller 320 derives the DLM for the PDV between the P1 and the P2. The derived DLM describes variations of the PDV over time. This description enables a dynamic trace of the packet delays and their variations. For this, the controller 320 explores DLMs of the packet delays φ_(s,k) and φ_(d,k). Then, the controller 320 derives the DLM for the PDV.

The derivation begins from an analysis of a packet exchange. Suppose repeated packet exchanges between the master node 110-1 and the slave node 110-2. The PDV of the P1 and the P2 are expressed by a numerical differential of the packet delay. For example, the numerical differential Δφ_(s,k)(=φ_(s,k)−φ_(s,k−1)) denotes the k-th PDV of the P1. In addition, the packet delays are expressed by time information of the clock of the master node 110-1. For example, a difference between T_(1,k) and T_(2,k) (T_(1,k)−T_(2,k)) denotes the packet delay of the k-th P1, φ_(s,k). The differentials of the information express their variation. A difference between ΔT_(1,k) and ΔT_(2,k) denotes the k-th PDV of the P1, Δφ_(s,k) where ΔT_(1,k)=T_(1,k)−T_(1,k−1), ΔT_(2,k)=T_(2,k)−T_(2,k−1). Similarly, a difference between ΔT_(3,k) and ΔT_(4,k) denotes the k-th PDV of the P2, Δφ_(d,k), where ΔT_(3,k)=T_(3,k)−T_(3,k−1), ΔT_(4,k)=T_(4,k)−T_(4,k−1). The numerical differentials of the packet delays provide the DLMs of the packet delays as following Equations (16) and (17):

φ_(s,k)=φ_(s,k−1) +ΔT _(2,k)−ΔT_(1,k)   (16)

φ_(d,k)≦φ_(d,k−1) +ΔT _(4,k) −ΔT _(3,k)   (17)

According to the FIG. 2, the T_(2,k) and T_(3,k), are not given to both of the master node 110-1 and the slave node 110-2. The controller 230 receives T_(1,k), C[T_(2,k) ^(κ−1)], C[T_(3,k) ^(κ−1)], and T_(4,k) through the input unit 310. Here, the given C[T_(2,k) ^(κ−1)] and C[T_(3,k) ^(κ−1)] may be represented by the following Equations (18) and (19):

$\begin{matrix} {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\varphi_{s,k}}}} & (18) \\ {{C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\left\{ {\left( {T_{4,k} - T_{1,k}} \right) - \varphi_{d,k}} \right\}}}} & (19) \end{matrix}$

From Equations (18) and (19), f₀ and f_(c) represent frequencies of the clock of the master node 110-1 and the clock of the slave node 110-2, respectively. Using the above time information of the slave node 110-2, the DLMs may be re-expressed by the following Equations (20) and (21):

$\begin{matrix} {\varphi_{s,k} = {\varphi_{s,{k - 1}} + {\frac{f_{0}}{f_{c,k}}{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack}} - {\Delta \; T_{1,k}}}} & (20) \\ {\varphi_{d,k} = {\varphi_{d,{k - 1}} + {\Delta \; T_{4,k}} - {\frac{f_{0}}{f_{c,k}}{C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}}}} & (21) \end{matrix}$

From Equations (21) and (22), ΔC[T_(i,k) ^(κ−1)]=C[T_(i,k) ^(κ−1)]−C[_(i,k−1) ^(κ−1)], i∈{2,3}. Note that the C[T_(i,k) ^(κ−1)] and C[T_(i,k−1) ^(κ−1)] are on the same axis. For given the Equations (18) to (21), the DLM may be derived as the following Equation (22):

$\begin{matrix} {{\psi_{k} = {\psi_{k - 1} + {\lbrack 11\rbrack \Gamma_{k}} + {{\frac{f_{0}}{f_{c,k}}\left\lbrack {{- 1} - 1} \right\rbrack}\Xi_{k}}}}{\Gamma_{k} = \left\lbrack {\Delta \; T_{1,k}\Delta \; T_{4,k}} \right\rbrack^{T}}{\Xi_{k} = \left\lbrack {\Delta \; {C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack}\Delta \; {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right\rbrack^{T}}} & (22) \end{matrix}$

When the Equations (18) and (19) are arranged as an equation in terms of Ψ_(k), and the Equations (20) and (21) are substituted into, the DML is derived by the Equation (23).

Lastly, the controller 230 estimates the clock offset {circumflex over (δ)}_(k) ^(new) and the packet delay {circumflex over (φ)}_(s,k) ^(new). Based on the above equations, the errors may be expressed by the Equations (23) and (24):

$\begin{matrix} {ɛ_{\delta,k} = {\frac{1}{2\; f_{0}}\left\{ {{\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)} - {f_{c,k}\psi_{k}}} \right\}}} & (23) \\ {ɛ_{\varphi,k} = {\frac{1}{2\; f_{0}}\left\{ {{f_{c,k}\psi_{k}} - {\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)}} \right\}}} & (24) \end{matrix}$

The estimated clock offset and the estimated packet delay which considers the errors according to the present invention are represented by the Equations (25) and (26), respectively:

$\begin{matrix} {{\hat{\delta}}_{k}^{new} = {{\hat{\delta}}_{k}^{1588} - ɛ_{\delta,k} + n_{k}}} & (25) \\ {{{\hat{\varphi}}_{s,k}^{new} = {\frac{f_{0}}{f_{c,k}}\left( {{\hat{\varphi}}_{s,k}^{1588} - ɛ_{\varphi,k} + n_{k}} \right)}}{where}{{\hat{\delta}}_{k}^{1588} = \left( {{{C\left\lbrack {T_{2,k}^{\kappa - 1} - T_{1,k}} \right)} - {{\hat{\varphi}}_{s,k}^{1588}{\hat{\varphi}}_{s,k}^{1588}}} = {\frac{1}{2}{\left\{ {\left( {T_{4,k} - {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right) + \left( {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} - T_{1,k}} \right)} \right\}.}}} \right.}} & (26) \end{matrix}$

From Equations (25) and (26), the last term on the right-hand side express noise of the clock of the slave node 110-2. Note that n_(k) refers to relative noise with respect to the clock of the slave node 110-2.

In various embodiments of the present invention, the controller 320 estimates the clock offset and the packet delay according to the above described process, and performs the clock synchronization with the other clock synchronization apparatus on the other side node or transmits the estimated clock offset and the estimated packet delay to the other clock synchronization apparatus of the other side node so that the other clock synchronization apparatus can perform the clock synchronization with the clock synchronization apparatus 300 (504) by modifying the clock of the other clock synchronization apparatus.

The clock synchronization method and apparatus according to the present disclosure enable accurate clock synchronization to be realized between nodes in real time using the IEEE 1588 PTP in a distributed system composed of partitioned real-time systems.

Example embodiments have been disclosed herein, and although specific terms are employed, they are used and are to be interpreted in a generic and descriptive sense only and not for purpose of limitation. In some instances, as would be apparent to one of ordinary skill in the art as of the filing of the present application, features, characteristics, and/or elements described in connection with a particular embodiment may be used singly or in combination with features, characteristics, and/or elements described in connection with other embodiments unless otherwise specifically indicated. Accordingly, it will be understood by those of skill in the art that various changes in form and details may be made without departing from the spirit and scope of the present disclosure as set forth in the following claims. 

What is claimed is:
 1. A clock synchronization method of a clock synchronization apparatus, comprising: obtaining time information including packet transmission and packet receiving time of master node and slave node through packet exchange between the master node and the slave node; estimating a clock offset and a packet delay between the master node and the slave node; and performing clock synchronization between the master node and the slave node based on the estimated clock offset and the packet delay.
 2. The clock synchronization method according to claim 1, wherein the time information includes a first packet transmission time of the master node T_(1,k), a first packet receiving time of the slave node C[T_(2,k) ^(κ−1)], a second packet transmission time of the slave node C[T_(3,k) ^(κ−1)] and a second packet receiving time of the master node T_(4,k).
 3. The clock synchronization method according to claim 2, wherein estimating the clock offset and the packet delay comprises: defining a relation between a packet delay of the first packet φ_(s,k) and a packet delay of the second packet φ_(d,k) based on a Packet Delay Variation (PDV) between the first packet and the second packet ψ_(k); deriving a Dynamic Linear Model (DLM) for the PDV; and estimating the clock offset and the packet delay based on the derived DLM.
 4. The clock synchronization method according to claim 3, wherein the relation between the packet delay of the first packet φ_(s,k) and the packet delay of the second packet φ_(d,k) is defined by the following Equation (1): φ_(d,k)=φ_(s,k)+ψ_(k)   (1).
 5. The clock synchronization method according to claim 4, wherein deriving the DLM for the PDV comprises: defining the packet delay of the first packet φ_(s,k) and the packet delay of the second packet φ_(d,k) by the following Equations (2) and (3), respectively, where T_(2,k) is a first packet receiving time of the master node, T_(3,k) is a second packet transmission time of the master node, a difference between ΔT_(1,k) and ΔT_(2,k) denotes a k-th PDV of the first packet in a k-th clock synchronization and a difference between ΔT_(3,k) and ΔT_(4,k) denotes a k-th PDV of the second packet in the k-th clock synchronization; φ_(s,k)=φ_(s,k−1) +ΔT _(2,k) −ΔT _(1,k)   (2) φ_(d,k)=φ_(d,k−1) +ΔT _(4,k) −ΔT _(3,k)   (3) defining the first packet receiving time of the slave node C[T_(2,k) ^(κ−1)] and the second packet transmission time of the slave node C[T_(3,k) ^(κ−1)] by the following Equations (4) and (5), respectively, where δ_(k) is a k-th clock offset in the k-th clock synchronization, f₀ and f_(c) represent frequencies of a clock of the master node and the clock of the slave node respectively; and $\begin{matrix} {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\varphi_{s,k}}}} & (4) \\ {{C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\left\{ {\left( {T_{4,k} - T_{1,k}} \right) - \varphi_{d,k}} \right\}}}} & (5) \end{matrix}$ deriving the DLM for the PDV by the following Equation (6), where $\begin{matrix} {{{\Delta \; T_{i,k}} = {T_{i,k} - T_{i,{k - 1}}}}, { \in \left\{ {1,4} \right\}}, {{\Delta \; {C\left\lbrack T_{j,k}^{\kappa - 1} \right\rbrack}} = {{C\left\lbrack T_{j,k}^{\kappa - 1} \right\rbrack} - {C\left\lbrack T_{j,{k - 1}}^{\kappa - 1} \right\rbrack}}}, {j \in \left\{ {2,3} \right\}},{\Gamma_{k} = \left\lbrack {{\Delta T}_{1,k}\Delta \; T_{4,k}} \right\rbrack^{T}}, {\Xi_{k} = {{\left\lbrack {\Delta \; {C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack}\Delta \; {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right\rbrack^{T} \cdot \psi_{k}} = {\psi_{k - 1} + {\lbrack 11\rbrack \Gamma_{k}} + {{\frac{f_{0}}{f_{c,k}}\left\lbrack {{- 1} - 1} \right\rbrack}\Xi_{k}}}}}} & (6) \end{matrix}$
 6. The clock synchronization method according to claim 5, wherein estimating the clock offset and the packet delay comprises: defining errors of the estimation of the packet delay of the first packet and the packet delay of the second packet by the following Equations (7) and (8); $\begin{matrix} {ɛ_{\delta,k} = {\frac{1}{2\; f_{0}}\left\{ {{\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)} - {f_{c,k}\psi_{k}}} \right\}}} & (7) \\ {ɛ_{\varphi,k} = {\frac{1}{2\; f_{0}}\left\{ {{f_{c,k}\psi_{k}} - {\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)}} \right\}}} & (8) \end{matrix}$ modeling the clock offset {circumflex over (δ)}_(k) ^(new) and the packet delay {circumflex over (φ)}_(s,k) ^(new) considering the errors by the following Equations (9) and (10), respectively, n_(k) refers to relative noise with respect to the clock of the slave node; and $\begin{matrix} {\mspace{79mu} {{\hat{\delta}}_{k}^{new} = {{\hat{\delta}}_{k}^{1588} - ɛ_{\delta,k} + n_{k}}}} & (9) \\ {\mspace{79mu} {{{{\hat{\varphi}}_{s,k}^{new} = {\frac{f_{0}}{f_{c,k}}\left( {{\hat{\varphi}}_{s,k}^{1588} - ɛ_{\varphi,k} + n_{k}} \right)}},\mspace{79mu} {where}}{{{\hat{\delta}}_{k}^{1588} = {{\left( {{C\left\lbrack T_{2,k}^{k - 1} \right\rbrack} - T_{1,k}} \right) - {{\hat{\varphi}}_{s,k}^{1588}\mspace{14mu} {and}\mspace{14mu} {\hat{\varphi}}_{s,k}^{1588}}} = {\frac{1}{2}\left\{ {\left( {T_{4,k} - {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right) + \left( {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} - T_{1,k}} \right)} \right\}}}},}}} & (10) \end{matrix}$ estimating the clock offset and the packet delay by inputting the time information to the modeled clock offset {circumflex over (δ)}_(k) ^(new) and the packet delay {circumflex over (φ)}_(s,k) ^(new).
 7. The clock synchronization method according to claim 1, wherein performing the clock synchronization comprises: transmitting the estimated clock offset and the packet delay to the slave node so that the slave node modifies the clock of the slave node based on the estimated clock offset and the packet delay.
 8. A clock synchronization apparatus, comprising: an input unit configured to perform packet exchange between a master node and a slave node; a controller configured to obtain time information including packet transmission and packet receiving time of the master node and the slave node through the packet exchange, estimate a clock offset and a packet delay between the master node and the slave node, and perform clock synchronization between the master node and the slave node based on the estimated clock offset and the packet delay.
 9. The clock synchronization apparatus according to claim 8, wherein the time information includes a first packet transmission time of the master node T_(1,k), a first packet receiving time of the slave node C[T_(2,k) ^(κ−1)], a second packet transmission time of the slave node C[T_(3,k) ^(κ−1)] and a second packet receiving time of the master node T_(4,k).
 10. The clock synchronization apparatus according to claim 9, wherein the controller defines a relation between a packet delay of the first packet φ_(s,k) and a packet delay of the second packet φ_(d,k) based on a Packet Delay Variation (PDV) ψ_(k), derives a Dynamic Linear Model (DLM) for the PDV and estimates the clock offset and the packet delay based on the derived DLM.
 11. The clock synchronization apparatus according to claim 10, wherein the controller defines the relation between the packet delay of the first packet φ_(s,k) and the packet delay of the second packet φ_(d,k) is defined by the following Equation (11): φ_(d,k)=φ_(s,k)+ψ_(k)   (11).
 12. The clock synchronization apparatus according to claim 11, wherein the controller defines the packet delay of the first packet φ_(s,k) and the packet delay of the second packet φ_(d,k) by the following Equations (12) and (13), respectively, where T_(2,k) is a first packet receiving time of the master node, T_(3,k) is a second packet transmission time of the master node, a difference between ΔT_(1,k) and ΔT_(2,k) denotes a k-th PDV of the first packet in a k-th clock synchronization and a difference between ΔT_(3,k) and ΔT_(4,k) denotes a k-th PDV of the second packet in the k-th clock synchronization; φ_(s,k)=φ_(s,k−1) +ΔT _(2,k) −ΔT _(1,k)   (12) φ_(d,k)=φ_(d,k−1) +ΔT _(4,k) −ΔT _(3,k)   (13) defines the first packet receiving time of the slave node C[T_(2,k) ^(κ−1)] and the second packet transmission time of the slave node C[T_(3,k) ^(κ−1)] by the following Equations (14) and (15), respectively, where (5), is a k-th clock offset in the k-th clock synchronization, f₀ and f_(c) represent frequencies of a clock of the master node and the clock of the slave node respectively; and $\begin{matrix} {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\varphi_{s,k}}}} & (14) \\ {{C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack} = {\left( {T_{1,k} + \delta_{k}} \right) + {\frac{f_{c,k}}{f_{0}}\left\{ {\left( {T_{4,k} - T_{1,k}} \right) - \varphi_{d,k}} \right\}}}} & (15) \end{matrix}$ derives the DLM for the PDV by the following Equation (16), where $\begin{matrix} {{{\Delta \; T_{i,k}} = {T_{i,k} - T_{i,{k - 1}}}}, { \in \left\{ {1,4} \right\}}, {{\Delta \; {C\left\lbrack T_{j,k}^{\kappa - 1} \right\rbrack}} = {{C\left\lbrack T_{j,k}^{\kappa - 1} \right\rbrack} - {C\left\lbrack T_{j,{k - 1}}^{\kappa - 1} \right\rbrack}}}, {j \in \left\{ {2,3} \right\}},{\Gamma_{k} = \left\lbrack {\Delta \; T_{1,k}\Delta \; T_{4,k}} \right\rbrack^{T}}, {\Xi_{k} = {{\left\lbrack {\Delta \; {C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack}\Delta \; {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right\rbrack^{T} \cdot \psi_{k}} = {\psi_{k - 1} + {\lbrack 11\rbrack \Gamma_{k}} + {{\frac{f_{o}}{f_{c,k}}\left\lbrack {{- 1} - 1} \right\rbrack}\Xi_{k}}}}}} & (16) \end{matrix}$
 13. The clock synchronization apparatus according to claim 12, wherein the controller defines errors of the estimation of the packet delay of the first packet and the packet delay of the second packet by the following Equations (17) and (18); $\begin{matrix} {ɛ_{\delta,k} = {\frac{1}{2\; f_{0}}\left\{ {{\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)} - {f_{c,k}\psi_{k}}} \right\}}} & (17) \\ {ɛ_{\varphi,k} = {\frac{1}{2\; f_{0}}\left\{ {{f_{c,k}\psi_{k}} - {\left( {f_{c,k} - f_{0}} \right)\left( {T_{4,k} - T_{1,k}} \right)}} \right\}}} & (18) \end{matrix}$ models the clock offset {circumflex over (δ)}_(k) ^(new) and the packet delay {circumflex over (φ)}_(s,k) ^(new) considering the errors by the following Equations (19) and (20), respectively, n_(k) refers to relative noise with respect to the clock of the slave node; and $\begin{matrix} {\mspace{79mu} {{\hat{\delta}}_{k}^{new} = {{\hat{\delta}}_{k}^{1588} - ɛ_{\delta,k} + n_{k}}}} & (19) \\ {\mspace{79mu} {{{{\hat{\varphi}}_{s,k}^{new} = {\frac{f_{0}}{f_{c,k}}\left( {{\hat{\varphi}}_{s,k}^{1588} - ɛ_{\varphi,k} + n_{k}} \right)}},\mspace{79mu} {where}}{{{\hat{\delta}}_{k}^{1588} = {{\left( {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} - T_{1,k}} \right) - {{\hat{\varphi}}_{s,k}^{1588}\mspace{14mu} {and}\mspace{14mu} {\hat{\varphi}}_{s,k}^{1588}}} = {\frac{1}{2}\left\{ {\left( {T_{4,k} - {C\left\lbrack T_{3,k}^{\kappa - 1} \right\rbrack}} \right) + \left( {{C\left\lbrack T_{2,k}^{\kappa - 1} \right\rbrack} - T_{1,k}} \right)} \right\}}}},}}} & (20) \end{matrix}$ estimates the clock offset and the packet delay by inputting the time information to the modeled clock offset {circumflex over (δ)}_(k) ^(new) and the packet delay {circumflex over (φ)}_(s,k) ^(new).
 14. The clock synchronization apparatus according to claim 8, further comprising an output unit to output the estimated clock offset and the packet delay to the slave node so that the slave node modifies the clock of the slave node based on the estimated clock offset and the packet delay. 